package com.eshore.norm.pattern.command;

import org.omg.CORBA.IRObject;

/**
 * 命令模式
 *
 * @author: v-chenjl62
 * @date: 2024/2/7 10:31
 */
public class Client {
    public static void main(String[] args) {
        SeniorChef seniorChef=new SeniorChef();

        Order order=new Order();
        order.setDiningTable(1);
        order.setFoodDir("炒饭",2);
        order.setFoodDir("烧鸡",1);
        order.setFoodDir("菜心",3);
        Command command=new OderCommand(seniorChef,order);

        Order order2=new Order();
        order2.setDiningTable(2);
        order2.setFoodDir("小米饭",4);
        order2.setFoodDir("烧鸭",1);
        order2.setFoodDir("红鱼",1);
        Command command2=new OderCommand(seniorChef,order2);

        Waitor waitor=new Waitor();
        waitor.setCommand(command);
        waitor.setCommand(command2);

        waitor.orderUp();
    }
}
